package com.tian.controller;

import com.tian.annotation.ArgsLogAnnotation;
import com.tian.dto.LoanPlainDto;
import com.tian.service.LoanPlainService;
import com.tian.utils.CommonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author tianwc  公众号：java后端技术全栈、面试专栏
 * @version 1.0.0
 * @date 2023年08月28日 15:35
 * 在线刷题 1200+题和1000+篇干货文章：<a href="https://woaijava.cc/">博客地址</a>
 */
@RestController
@RequestMapping("/loan/plain")
public class LoanPlainController {

    @Resource
    private LoanPlainService loanPlainService;

    @ArgsLogAnnotation(methodDescription = "查询单条还款计划")
    @GetMapping("/{id}")
    public CommonResult<LoanPlainDto> queryById(@PathVariable Long id) {
        return loanPlainService.queryById(id);
    }
}
